﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace eStock.DataObjects
{
    public class Order
    {
        public int Id { get; set; }
        public int ComponentId { get; set; }
        public Component Component { get { return DatabaseObjects.Components != null ? DatabaseObjects.Components.GetById(ComponentId) : null; } }
        public int ProjectId { get; set; }
        public Project Project { get { return DatabaseObjects.Projects != null ? DatabaseObjects.Projects.GetById(ComponentId) : null; } }
        public string Title { get; set; }
        public int Amount { get; set; }
        public int Status { get; set; }
        public DateTime OrderDate { get; set; }
        public int ShopId { get; set; } //ShopId = AddressId
        public Address Shop { get { return DatabaseObjects.Addresses != null ? DatabaseObjects.Addresses.GetById(ShopId) : null; } }
    }
}
